package backpage.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

/**
 * 部门信息类，对应数据库中的 Department 表
 * @author 吴文钦
 */
@Data
@TableName("department")  // 指定表名
public class Department {

    @TableId(value = "department_id", type = IdType.AUTO)
    private Integer departmentId; // 部门唯一标识ID，自增长

    @TableField(value = "department_code")
    private String departmentCode; // 部门编号，唯一标识，不可为空

    @TableField(value = "department_name")
    private String departmentName; // 部门名称，唯一，不可为空

    @TableField(value = "department_staff_number")
    private Integer departmentStaffNumber; // 部门现有人数，不可为空

    @TableField(value = "department_history_staff_number")
    private Integer departmentHistoryStaffNumber; // 部门创建初至今加入的人数，不可为空

    @TableField(value = "remarks")
    private String remarks; // 部门备注信息，可为空

    @TableField(value = "manager_id")  // 对应数据库中的 manager_id 字段
    private Integer managerId; // 部门经理的ID，关联员工表的员工ID

    // 无参构造方法
    public Department() {
    }

    // 全参构造方法
    public Department(Integer departmentId, String departmentCode, String departmentName, Integer departmentStaffNumber, Integer departmentHistoryStaffNumber, String remarks, Integer managerId) {
        this.departmentId = departmentId;
        this.departmentCode = departmentCode;
        this.departmentName = departmentName;
        this.departmentStaffNumber = departmentStaffNumber;
        this.departmentHistoryStaffNumber = departmentHistoryStaffNumber;
        this.remarks = remarks;
        this.managerId = managerId;
    }

    // Getter 和 Setter 方法
    public Integer getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(Integer departmentId) {
        this.departmentId = departmentId;
    }

    public String getDepartmentCode() {
        return departmentCode;
    }

    public void setDepartmentCode(String departmentCode) {
        this.departmentCode = departmentCode;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Integer getDepartmentStaffNumber() {
        return departmentStaffNumber;
    }

    public void setDepartmentStaffNumber(Integer departmentStaffNumber) {
        this.departmentStaffNumber = departmentStaffNumber;
    }

    public Integer getDepartmentHistoryStaffNumber() {
        return departmentHistoryStaffNumber;
    }

    public void setDepartmentHistoryStaffNumber(Integer departmentHistoryStaffNumber) {
        this.departmentHistoryStaffNumber = departmentHistoryStaffNumber;
    }

    public Integer getManagerId() {
        return managerId;
    }

    public void setManagerId(Integer managerId) {
        this.managerId = managerId;
    }
}
